'use strict';
var calculate_average = function(collection){
    let arr=collection.filter(
        function filtered(element,index,array){
            return index%2!==0;
        }
    );
    let i=arr.reduce(
        function reduced(a,b){
            return a+b;
        }
    );
    return i/arr.length;
};
module.exports = calculate_average;
